<?php

namespace Addons\IntegralShop\Model;

use Think\Model;

class IsGoodModel extends Model
{
    /**
     * 获取所有未删除的商品
     * @param $id
     * @param string $field
     * @return array|bool|mixed|string|null
     */
    public function getOne($id, $field = "*")
    {
        return $this->field($field)->where(['id' => $id, 'is_deleted' => 0])->find();
    }

    public function getOneAllStatus($id, $field = "*"){
        return $this->field($field)->where(['id' => $id, 'is_deleted' => 0])->find();
    }
}
